I'm starting to get acquainted with node-binance-api. So im trying to withdraw some usdt for test as it said in docs.
const Binance = require('node-binance-api');
const { api_key, secret_key } = ...
const binance = new Binance().options({
APIKEY: api_key,
APISECRET: secret_key,
useServerTime: true,
recvWindow: 60000
});
binance.withdraw("USDT", "some usdt binance address....", 0.1, false, function(response) {
console.log(response);
});
So the problem is in console.log(response); that returns me a <ref *2> IncomingMessage {...} with this body:
This endpoint has been deprecated, please integrate with “POST@/sapi/v1/capital/withdraw/apply”. See details in the announcement: here
as I understand it, this method (.withdraw) uses /wapi, and I need to somehow change it to /sapi since vapi is outdated. The problem is that I don't know how to do it and I can't find a solution on my own. How can I avoid this problem and preferably not face it again? And if you can explain how this method should work and so on, I will be very grateful.
It can help:


